<template>
  <div class="explain-box">
    <div class="explain-title-box">
      <div class="explain-icon small-icon"></div>
      <div class="explain-icon middle-icon"></div>
      <div class="explain-icon big-icon"></div>
      <div class="explain-title">{{ info.explainTitle }}</div>
      <div class="explain-icon big-icon"></div>
      <div class="explain-icon middle-icon"></div>
      <div class="explain-icon small-icon"></div>
    </div>
    <div class="part-box">
      <p>
        <span class="part-num">1.</span>
        <span class="general">{{ info.general }}</span>
        <span>{{ info.generalContent }}</span>
      </p>

      <p>
        <span class="part-num">2.</span>
        <span class="general">{{ info.simple }}</span>
        <span>{{ info.simpleContent }}</span>
      </p>
      <p>
        <span class="part-num">3.</span>
        <span class="general">{{ info.dorgan }}</span>
        <span>{{ info.dorganContent }}</span>
      </p>
      <p>
        <span class="part-num">4.</span>
        <span class="general">{{ info.view }}</span>
        <span>{{ info.viewContent }}</span>
      </p>
      <p>
        <span class="part-num">5.</span>
        <span class="general">{{ info.import }}</span>
        <span>{{ info.importContent }}</span>
      </p>
      <p>
        <span class="part-num">6.</span>
        <span class="general">{{ info.relation }}</span>
        <span>{{ info.relationContent }}</span>
      </p>
    </div>
  </div>
</template>

<script>
  import { defineComponent, toRefs } from 'vue';
  import { useI18n } from '@common/locales';
  export default defineComponent({
    name: 'NounExplain',
    setup() {
      const t = useI18n().t;
      const state = {
        info: {
          explainTitle: t('resourceBoard.explain.explainTitle'),
          general: t('resourceBoard.explain.general'),
          generalContent: t('resourceBoard.explain.generalContent'),
          simple: t('resourceBoard.explain.simple'),
          simpleContent: t('resourceBoard.explain.simpleContent'),
          dorgan: t('resourceBoard.explain.dorgan'),
          dorganContent: t('resourceBoard.explain.dorganContent'),
          view: t('resourceBoard.explain.view'),
          viewContent: t('resourceBoard.explain.viewContent'),
          import: t('resourceBoard.explain.import'),
          importContent: t('resourceBoard.explain.importContent'),
          relation: t('resourceBoard.explain.relation'),
          relationContent: t('resourceBoard.explain.relationContent'),
        },
      };

      return {
        ...toRefs(state),
      };
    },
  });
</script>
<style>
  .explain-box p {
    margin-bottom: 0;
  }
</style>
<style scoped lang="less">
  .explain-box {
    width: 100%;
    .explain-title-box {
      width: 100%;
      height: 60px;
      display: flex;
      justify-content: center;
      align-items: center;
      .explain-icon {
        background: #3f3f3f;
        border-radius: 50%;
      }
      .small-icon {
        width: 4px;
        height: 4px;
        opacity: 0.2;
      }
      .middle-icon {
        width: 7px;
        height: 7px;
        opacity: 0.6;
        margin: 0 4px;
      }
      .big-icon {
        width: 10px;
        height: 10px;
      }
      .explain-title {
        font-size: 18px;
        // font-family: 'PingFang SC, PingFang SC-Bold';
        font-weight: bold;
        color: #3f3f3f;
        padding: 0 10px;
      }
    }
    .part-box {
      width: 100%;
      padding: 20px;
      font-size: 16px;
      // font-family: 'PingFang SC, PingFang SC-Normal';
      color: #3f3f3f;
      line-height: 30px;
      background-color: #fff;
      border-radius: 4px;
      .part-num {
        width: 13px;
        display: inline-block;
        text-align: right;
      }
      .general {
        color: #3265f5;
        font-weight: bold;
      }
    }
  }
</style>
